<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>后台管理</title>
        <meta name="renderer" content="webkit">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
        <link rel="icon" href="javascript:;">
        <link rel="stylesheet" href="../../resource/layui/css/layui.css"  media="all">
        <link rel="stylesheet" href="../../resource/myResource/css/no_read_item.css">
    </head>
    <body>
        <div class="layui-form-item" style="margin-top:40px">
            <div class="layui-form-item layui-form-text">
                    <label class="layui-form-label" style="display:block">拒修理由:</label>
                <div class="layui-input-block" style="margin-left:15%;margin-right: 10% ;text-align:left;">
                    <textarea id="msg" placeholder="无报修说明" class="layui-textarea" style="resize: none;"></textarea>
                </div>
            </div>
        </div>
        <div style="margin-top:120px;">
            <button type="button" class="layui-btn layui-btn-danger " style="margin-left:10%" onclick="closeSelf()">取消</button>
            <button type="button" class="layui-btn layui-btn-normal "style="margin-left:60%" onclick="commitBtn()">确定提交</button>
        </div>
    </body>
    <script src="../../resource/jquery/dist/jquery.js"></script>
    <script src="../../resource/layui/layui.js" charset="utf-8"></script>
    <script src="../../resource/myResource/js/base.js"></script>
    <script>
        function commitBtn(){
            var id = GetQueryString("id");
            var data = {};
            data.id=id;
            data.operationId = getId();
            data.msg = $("#msg").val();
            $.ajax({
                url:head+"/manager/refuseRepair"
                ,dataType:"json"
                ,type:"POST"
                ,data:data
                ,success:function(data){
                    if(data.code == 0){
                        // alert(123)
                        window.parent.closeSelf();
                        // close();
                    }
                    else
                       alert(data.code);
                }
            })
        };
        function closeSelf(){
            // window.parent.location.reload();
            var index = parent.layer.getFrameIndex(window.name);
            // alert(index);
            parent.layer.close(index);
            // parent.reload();
        }
    </script>
</html>